﻿@using SmartCode
@using SmartCode.Db
@model BuildContext
@{
    var project = Model.Project;
    var dbSource = Model.GetDataSource<DbSource>();
    var dbProvider = dbSource.DbProvider;
    var writeDataSource = dbSource.WriteDataSource;
}
<?xml version="1.0" encoding="utf-8" ?>
<!--
@{ await Html.RenderPartialAsync("Copyright.cshtml", Model); }
-->
<SmartSqlMapConfig xmlns="http://SmartSql.net/schemas/SmartSqlMapConfig.xsd">
    <Settings IsWatchConfigFile="true" />
    <Database>
        <DbProvider Name="@dbProvider.Name" ParameterPrefix="@dbProvider.ParameterPrefix" Type="@dbProvider.Type" />
        <Write Name="@writeDataSource.Name" ConnectionString="@writeDataSource.ConnectionString" />
        <Read Name="@writeDataSource.Name" ConnectionString="@writeDataSource.ConnectionString" Weight="80" />
    </Database>

    <TypeHandlers>
        <TypeHandler Name="Json" Type="SmartSql.TypeHandler.JsonTypeHandler,SmartSql.TypeHandler" />
        <TypeHandler Name="Xml" Type="SmartSql.TypeHandler.XmlTypeHandler,SmartSql.TypeHandler" />
    </TypeHandlers>
    <SmartSqlMaps>
        <SmartSqlMap Path="Maps" Type="Directory"></SmartSqlMap>
    </SmartSqlMaps>
</SmartSqlMapConfig>
